package com.hjc.dao;

import com.hjc.dao.user.Ink;

import java.awt.*;

/**
 * 灰色墨盒。GreyInk实现Ink
 */
public class GreInk implements Ink {
    @Override
    public String getColor(int r, int g, int b) {
        int c = (r+g+b)/3;
        Color color = new Color(c,c,c);

        return "#"+Integer.toHexString(color.getRGB()).substring(2);
    }
}
